Processing images of media items before validation

ABSTRACT

Automatic media item validation is typically problematic in the case of media items that are damaged or marked. A method of processing images of media items before automatic validation which addresses this problem is described. Aberrant image elements are identified, for example, using a bandpass filter. The aberrant image elements are replaced by neutral decision making data. This data is neutral with respect to a decision making process being a specified automatic media item validation process. For example, for each aberrant image element an estimated distribution is accessed for that image position across all images in a training set of images of media items. A value is selected from the estimated distribution on the basis of a significance level which is related to a significance level used by the automatic media item validation process. In this way media items which have tears, holes, marks or soiling may be successfully processed by an automated media item validator.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation-in-part application of U.S. patentapplication Ser. No. 11/366,147, filed on Mar. 2, 2006, which is acontinuation-in-part application of U.S. patent application Ser. No.11/305,537, filed on Dec. 16, 2005. Application Ser. No. 11/366,147,filed on Mar. 2, 2006 and application Ser. No. 11/305,537, filed on Dec.16, 2005 are hereby incorporated by reference.

TECHNICAL FIELD

The present invention relates to a method and apparatus for processingimages of media items before validation. It is particularly related to,but in no way limited to, processing images of media items such asbanknotes, passports, bonds, share certificates, checks and the like.

BACKGROUND

There is a growing need for automatic verification and validation ofbanknotes of different currencies and denominations in a simple,reliable, and cost effective manner. This is required, for example, inself-service apparatus which receives banknotes, such as self-servicekiosks, ticket vending machines, automated teller machines arranged totake deposits, self-service currency exchange machines and the like.

Previously, manual methods of currency validation have involved imageexamination, transmission effects such as watermarks and threadregistration marks, feel and even smell of banknotes. Other knownmethods have relied on semi-overt features requiring semi-manualinterrogation. For example, using magnetic means, ultraviolet sensors,fluorescence, infrared detectors, capacitance, metal strips, imagepatterns and similar. However, by their very nature these methods aremanual or semi-manual and are not suitable for many applications wheremanual intervention is unavailable for long periods of time. Forexample, in self-service apparatus.

There are significant problems to be overcome in order to create anautomatic currency validator. For example, many different types ofcurrency exist with different security features and even substratetypes. Within those different denominations also exist commonly withdifferent levels of security features. There is therefore a need toprovide a generic method of easily and simply performing currencyvalidation for those different currencies and denominations.

Previous automatic validation methods typically require a relativelylarge number of examples of counterfeit banknotes to be known in orderto train the classifier. In addition, those previous classifiers aretrained to detect known counterfeits only. This is problematic becauseoften little or no information is available about possible counterfeits.For example, this is particularly problematic for newly introduceddenominations or newly introduced currency.

In an earlier paper entitled, “Employing optimized combinations ofone-class classifiers for automated currency validation”, published inPattern Recognition 37, (2004) pages 1085-1096, by Chao He, MarkGirolami and Gary Ross (two of whom are inventors of the presentapplication) an automated currency validation method is described(Patent No. EP1484719, US2004247169). This involves segmenting an imageof a whole banknote into regions using a grid structure. Individual“one-class” classifiers are built for each region and a small subset ofthe region specific classifiers are combined to provide an overalldecision. (The term, “one-class” is explained in more detail below.) Thesegmentation and combination of region specific classifiers to achievegood performance is achieved by employing a genetic algorithm. Thismethod requires a small number of counterfeit samples at the geneticalgorithm stage and as such is not suitable when counterfeit data isunavailable.

There is also a need to perform automatic currency validation in acomputationally inexpensive manner which can be performed in real time.

Automatic currency validation is typically problematic in the case ofbanknotes that are damaged or marked. For example, if a banknote hastears, holes, stains and/or folded corners. Aging of banknotes andsoiling that occurs during wear of banknotes is also problematic forautomatic currency validation systems.

Many of the issues mentioned above also apply to validation of othertypes of media such as passports, share certificates, bond, checks andthe like.

SUMMARY

Automatic media validation is typically problematic in the case of mediaitems that are damaged or marked. A method of processing images of mediaitems before automatic validation which addresses this problem isdescribed. Aberrant image elements are identified, for example, using abandpass filter. The aberrant image elements are replaced by neutraldecision making data. This data is neutral with respect to a decisionmaking process being a specified automatic currency validation process.For example, for each aberrant image element an estimated distributionis accessed for that image position across all images in a training setof media item images. A value is selected from the estimateddistribution on the basis of a significance level which is related to asignificance level used by the automatic media validation process. Inthis way media items which have tears, holes, marks or soiling may besuccessfully processed by an automated media validator.

The methods described herein may be performed by software in machinereadable form on a storage medium. The method steps may be carried outin any suitable order and/or in parallel as is apparent to the skilledperson in the art.

This acknowledges that software can be a valuable, separately tradablecommodity. It is intended to encompass software, which runs on orcontrols “dumb” or standard hardware, to carry out the desiredfunctions, (and therefore the software essentially defines the functionsof the media validator, and can therefore be termed a media validator,even before it is combined with its standard hardware). For similarreasons, it is also intended to encompass software which “describes” ordefines the configuration of hardware, such as HDL (hardware descriptionlanguage) software, as is used for designing silicon chips, or forconfiguring universal programmable chips, to carry out desiredfunctions.

The preferred features may be combined as appropriate, as would beapparent to a skilled person, and may be combined with any of theaspects of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the invention will be described, by way of example, withreference to the following drawings, in which:

FIG. 1 is a flow diagram of a method of identifying and replacingaberrant image elements in a banknote image;

FIG. 2 is a flow diagram of a method of creating a classifier forbanknote validation;

FIG. 3 is a flow diagram of a method of replacing aberrant imageelements in a banknote image;

FIG. 4 is a schematic diagram of an apparatus for creating a classifierfor banknote validation;

FIG. 5 is a schematic diagram of a banknote validator;

FIG. 6 is a flow diagram of a method of validating a banknote;

FIG. 7 is a schematic diagram of a self-service apparatus with abanknote validator.

DETAILED DESCRIPTION

Embodiments of the present invention are described below by way ofexample only. These examples represent the best ways of putting theinvention into practice that are currently known to the Applicantalthough they are not the only ways in which this could be achieved.Although the present examples are described and illustrated herein asbeing implemented for automatic currency validation, the systemsdescribed herein are described as examples and not limitations. As thoseskilled in the art will appreciate, the present examples are suitablefor application in a variety of different types of media validationsystems, including but not limited to passport validation systems, checkvalidation systems and validation systems for bonds and sharecertificates.

The term “one class classifier” is used to refer to a classifier that isformed or built using information about examples only from a singleclass but which is used to allocate newly presented examples either tothat single class or not. This differs from a conventional binaryclassifier which is created using information about examples from twoclasses and which is used to allocate new examples to one or other ofthose two classes. A one-class classifier can be thought of as defininga boundary around a known class such that examples falling out with thatboundary are deemed not to belong to the known class.

As mentioned above, Automatic currency validation is typicallyproblematic in the case of banknotes that are damaged or marked. Forexample, if a banknote has tears, holes, stains and/or folded corners.Aging of banknotes and soiling that occurs during wear of banknotes isalso problematic for automatic currency validation systems.

For example, an automatic currency validation system may use a processwhereby an image of a banknote to be validated is divided into segments.Those segments may be formed using a grid structure or other methodusing spatial position information alone. Alternatively, the segmentsmay be formed using a segmentation map that uses information aboutrelative values of image elements between corresponding image elementsin each member of a set of training banknote images.

If a banknote to be validated is damaged or marked then this leads toproblems in the automatic banknote validation process because some ofthe information is aberrant or corrupt. For example, holes in a banknotemay result in pixels of abnormally high intensity in an image of thatbanknote. Also, soiling or marks on a banknote may result in pixels ofabnormally low intensity in an image of that banknote.

In the case that an image of a banknote to be validated is divided intosegments as part of the validation process, one option is to ignorethose segments which contain aberrant data (for example, holes, marks,folds, tears, etc.). However, where only a low number of segments areused this means that a large proportion of data is ignored. Also, if theignored segment happens to contain important banknote regions such as asecurity feature (e.g. hologram, thread mark, watermark, etc.) then theconfidence level of the banknote validator will drop.

In order to address these problems we identify aberrant image elementsin an image of a media item such as a banknote to be validated andreplace those by decision-neutral data. By “decision-neutral data” or“neutral decision making data” we mean data which will not influence theoutcome of a pre-specified media item validation process. That mediaitem validation process may be of any suitable type, including but notlimited to, the particular media item validation processes describedherein.

FIG. 1 is a high level flow diagram of a method of processing an imageof a banknote to be validated.

An image of a banknote to be validated is captured (see box 1) using anysuitable technique as described in more detail below. The image isnormalized and/or pre-processed (see box 2) for example to align it in aparticular orientation and to scale it to a particular size. Thisenables variations in sensors and lighting conditions to be taken intoaccount. An optional step (see box 3) then involves using a recognitionalgorithm to determine one or more of the currency, series, denominationand orientation of the banknote. If the recognition algorithm fails thenit may be retried by referencing different edges or corners of thebanknote image. If all four edges are attempted and failed then the noteis rejected (see box 7). Otherwise the process continues and looks foraberrations in the image (see box 4).

Aberrations may be identified in any suitable manner. For example,missing areas or holes in a banknote typically give rise to image areasof abnormally high brightness. In this case, all image areas, elementsor pixels with an intensity above a specified threshold may beidentified as aberrations.

In some currencies, polymer notes are used with windows. Such windowsalso give rise to image areas of high brightness. In order that thesewindows are not identified as aberrations, knowledge about expectedlocation, position and size of these windows can be taken into accountwhen identifying aberrations.

Stains, marker pen marks, staples, folds and other such damage givesrise to overly opaque areas in banknote images. In this case, all imageareas, elements or pixels with an intensity below a specified thresholdmay be identified as aberrations. Optionally, information about theexpected intensities of image elements for particular currencies anddenominations may be taken into account when identifying theaberrations.

To quickly identify image elements with intensities either above orbelow specified thresholds a bandpass filter may be used.

Once the aberrations are identified, they are removed by being replacedby decision-neutral data (see box 5). Optionally, a check is made on theproportion of the banknote image identified as aberrant. If thisproportion is above a specified threshold then the banknote is rejectedif it has not already been rejected at the recognition algorithm stage(box 7). This ensures that counterfeit notes formed from parts ofgenuine notes joined to parts of obscured counterfeit notes arerejected. Also, in this way it is possible to place a limit on theamount of aberrant data that may be replaced. As the process tendstowards 100% of the banknote image being replaced by decision-neutraldata the ability to detect counterfeits is reduced.

The resulting modified image of the banknote is then passed to abanknote validation system (see box 6) to be validated.

The process of forming the decision neutral data is described in moredetail below with reference to FIG. 3.

In a particular group of embodiments the pre-specified banknotevalidation process uses a classifier formed as now described.

FIG. 2 is a high level flow diagram of a method of creating a classifierfor banknote validation.

First we obtain a training set of images of genuine banknotes (see box10 of FIG. 1). These are images of the same type taken of banknotes ofthe same currency and denomination. The type of image relates to how theimages are obtained, and this may be in any manner known in the art. Forexample, reflection images, transmission images, images on any of a red,blue or green channel, thermal images, infrared images, ultravioletimages, x-ray images or other image types. The images in the trainingset are in registration and are the same size. Pre-processing can becarried out to align the images and scale them to size if necessary, asknown in the art.

We next create a segmentation map using information from the trainingset images (see box 12 of FIG. 2). The segmentation map comprisesinformation about how to divide an image into a plurality of segments.The segments may be non-continuous, that is, a given segment cancomprise more than one patch in different regions of the image.Preferably, but not essentially, the segmentation map also comprises aspecified number of segments to be used.

Using the segmentation map we segment each of the images in the trainingset (see box 14 of FIG. 2). We then extract one or more features fromeach segment in each of the training set images (see box 16 of FIG. 2).By the term “feature” we mean any statistic or other characteristic of asegment. For example, the mean pixel intensity, median pixel intensity,mode of the pixel intensities, texture, histogram, Fourier transformdescriptors, wavelet transform descriptors and/or any other statisticsin a segment.

A classifier is then formed using the feature information (see box 18 ofFIG. 2). Any suitable type of classifier can be used as known in theart. In a particularly preferred embodiment of the invention theclassifier is a one-class classifier and no information aboutcounterfeit banknotes is needed. However, it is also possible to use abinary classifier or other type of classifier of any suitable type asknown in the art.

The method in FIG. 2 enables a classifier for validation of banknotes ofa particular currency and denomination to be formed simply, quickly andeffectively. To create classifiers for other currencies or denominationsthe method is repeated with appropriate training set images.

Previously in EP1484719 and US2004247169, (as mentioned in thebackground section) we used a segmentation technique that involved usinga grid structure over the image plane and a genetic algorithm method toform the segmentation map. This necessitated using some informationabout counterfeit notes, and incurring computational costs whenperforming the genetic algorithm search.

Embodiments described herein may use a different method of forming thesegmentation map which removes the need for using a genetic algorithm orequivalent method to search for a good segmentation map within a largenumber of possible segmentation maps. This reduces computational costand improves performance. In addition the need for information aboutcounterfeit banknotes is removed.

We believe that generally it is difficult in the counterfeiting processto provide a uniform quality of imitation across the whole note andtherefore certain regions of a note are more difficult than others to becopied successfully. We therefore recognized that rather than using arigidly uniform grid segmentation we could improve banknote validationby using a more sophisticated segmentation. Empirical testing that wecarried out indicated that this is indeed the case. Segmentation basedon morphological characteristics such as pattern, color and texture ledto a better performance in detecting counterfeits. However, traditionalimage segmentation methods, such as using edge detectors, when appliedto each image in the training set were difficult to use. This is becausevarying results are obtained for each training set member and it isdifficult to align corresponding features in different training setimages. In order to avoid this problem of aligning segments we used, inone preferred embodiment, a so called “spatio-temporal imagedecomposition”.

Details about the method of forming the segmentation map are now given.At a high level this method can be thought of as specifying how todivide the image plane into a plurality of segments, each comprising aplurality of specified pixels. The segments can be non-continuous asmentioned above. For example, this specification is made on the basis ofinformation from all images in the training set. In contrast,segmentation using a rigid grid structure does not require informationfrom images in the training set.

For example, each segmentation map comprises information aboutrelationships of corresponding image elements between all images in thetraining set.

Consider the images in the training set as being stacked and inregistration with one another in the same orientation. Taking a givenpixel in the note image plane this pixel is thought of as having a“pixel intensity profile” comprising information about the pixelintensity at that particular pixel position in each of the training setimages. Using any suitable clustering algorithm, pixel positions in theimage plane are clustered into segments, where pixel positions in thosesegments have similar or correlated pixel intensity profiles.

In a preferred example we use these pixel intensity profiles. However,it is not essential to use pixel intensity profiles. It is also possibleto use other information from all images in the training set. Forexample, intensity profiles for blocks of 4 neighboring pixels or meanvalues of pixel intensities for pixels at the same location in each ofthe training set images.

A particularly preferred embodiment of our method of forming thesegmentation map is now described in detail. This is based on the methodtaught in the following publication “EigenSegments: A spatio-temporaldecomposition of an ensemble of images” by Avidan, S. Lecture Notes inComputer Science, 2352: 747-758, 2002.

Given an ensemble of images {I}i=1,2, . . . ,N which have beenregistered and scaled to the same size r×c, each image I_(i) can berepresented by its pixels as [a_(1i),a_(2i), . . . ,a_(Mi)]^(T) invector form, where a_(ji)(j=1,2, . . . ,M) is the intensity of the jthpixel in the ith image and M=r·c is the total number of pixels in theimage. A design matrix A∈

^(M×N) can then be generated by stacking vectors I_(i) (zeroed using themean value) of all images in the ensemble, thus A=[I₁,I₂, . . . ,I_(N)].A row vector [a_(ji),a_(j2), . . . ,a_(jN)] in A can be seen as anintensity profile for a particular pixel (jth) across N images. If twopixels come from the same pattern region of the image they are likely tohave the similar intensity values and hence have a strong temporalcorrelation. Note the term “temporal” here need not exactly correspondto the time axis but is borrowed to indicate the axis across differentimages in the ensemble. Our algorithm tries to find these correlationsand segments the image plane spatially into regions of pixels that havesimilar temporal behavior. We measure this correlation by defining ametric between intensity profiles. A simple way is to use the Euclideandistance, i.e. the temporal correlation between two pixels j and k canbe denoted as${d\left( {j,k} \right)} = {\sqrt{\sum\limits_{i = 1}^{N}\left( {a_{ji} - a_{ki}} \right)^{2}}.}$The smaller d(j,k), the stronger the correlation between the two pixels.

In order to decompose the image plane spatially using the temporalcorrelations between pixels, we run a clustering algorithm on the pixelintensity profiles (the rows of the design matrix A). It will produceclusters of temporally correlated pixels. The most straightforwardchoice is to employ the K-means algorithm, but it could be any otherclustering algorithm. As a result the image plane is segmented intoseveral segments of temporally correlated pixels. This can then be usedas a map to segment all images in the training set; and a classifier canbe built on features extracted from those segments of all images in thetraining set.

In order to achieve the training without utilizing counterfeit notes,one-class classifier is preferable. Any suitable type of one-classclassifier can be used as known in the art. For example, neural networkbased one-class classifiers and statistical based one-class classifiers.

Suitable statistical methods for one-class classification are in generalbased on maximization of the log-likelihood ratio under thenull-hypothesis that the observation under consideration is drawn fromthe target class and these include the D² test (described in Morrison, DF: Multivariate Statistical Methods (third edition). McGraw-HillPublishing Company, New York, 1990) which assumes a multivariateGaussian distribution for the target class (genuine currency). In thecase of an arbitrary non-Gaussian distribution the density of the targetclass can be estimated using for example a semi-parametric Mixture ofGaussians (described in Bishop, C M: Neural Networks for PatternRecognition, Oxford University Press, New York, 1995) or anon-parametric Parzen window (described in Duda, R O, Hart, P E, Stork,D G: Pattern Classification (second edition), John Wiley & Sons, INC,New York, 2001) and the distribution of the log-likelihood ratio underthe null-hypothesis can be obtained by sampling techniques such as thebootstrap (described in Wang, S, Woodward, W A, Gary, H L et al. A newtest for outlier detetion from a multivariate mixture distribution,Journal of Computational and Graphical Statistics, 6 (3): 285-299,1997).

Other methods which can be employed for one-class classification areSupport Vector Data Domain Description (SVDD) (described in Tax, D M J,Duin, R P W: Support vector domain description, Pattern RecognitionLetters, 20 (11-12): 1191-1199, 1999), also known as ‘supportestimation’ (described in Hayton, P, Schölkopf, B, Tarrassenko, L,Anuzis, P: Support Vector Novelty Detection Applied to Jet EngineVibration Spectra, Advances in Neural Information Processing Systems,13, eds Leen, Todd K and Dietterich, Thomas G and Tresp, Volker, MITPress, 946-952, 2001) and Extreme Value Theory (EVT) (described inRoberts, S J: Novelty detection using extreme value statistics. IEEProceedings on Vision, Image & Signal Processing, 146 (3):124-129,1999). In SVDD the support of the data distribution isestimated, whilst the EVT estimates the distribution of extreme values.For this particular application, large numbers of examples of genuinenotes are available, so in this case it is possible to obtain reliableestimates of the target class distribution. We therefore chooseone-class classification methods that can estimate the densitydistribution explicitly in a preferred embodiment, although this is notessential. In a preferred embodiment we use one-class classificationmethods based on the parametric D² test).

In a preferred embodiment, the statistical hypothesis tests used for ourone-class classifier are detailed as follows:

Consider N independent and identically distributed p-dimensional vectorsamples (the feature set for each banknote) x₁, . . . ,X_(N) ÅC with anunderlying density function with parameters θ given as p(x|θ). Thefollowing hypothesis test is given for a new point x_(N+1) such thatH₀:x_(N+1)ÅC vs. H₁: x_(N+1) ∉C, where C denotes the region where thenull hypothesis is true and is defined by p(x|θ). Assuming that thedistribution under the alternate hypothesis is uniform then the standardlog-likelihood ratio for the null and alternate hypothesis$\begin{matrix}{\lambda = {\frac{\sup\limits_{\theta \in \Theta}{L_{0}(\theta)}}{\sup\limits_{\theta \in \Theta}{L_{1}(\theta)}} = \frac{\sup\limits_{\theta}{\prod\limits_{n = 1}^{N + 1}{p\left( x_{n} \middle| \theta \right)}}}{\sup\limits_{\theta}{\prod\limits_{n = 1}^{N}\left( x_{n} \middle| \theta \right)}}}} & (1)\end{matrix}$can be employed as a test statistic for the null-hypothesis. In thispreferred embodiment we can use the log-likelihood ratio as teststatistic for the validation of a newly presented note.

1) Feature vectors with multivariate Gaussian density: Under theassumption that the feature vectors describing individual points in asample are multivariate Gaussian, a test that emerges from the abovelikelihood ratio (1), to assess whether each point in a sample shares acommon mean is described in (Morrison, D F: Multivariate StatisticalMethods (third edition). McGraw-Hill Publishing Company, New York,1990). Consider N independent and identically distributed p-dimensionalvector samples x₁, . . . ,x_(N) from a multivariate normal distributionwith mean μ and covariance C, whose sample estimates are {circumflexover (μ)}_(N) and Ĉ_(N). From the sample consider a random selectiondenoted as x₀, the associated squared Mahalanobis distanceD ²=(x₀−{circumflex over (μ)}_(N))^(T) Ĉ _(N) ⁻¹(x₀−{circumflex over(μ)}_(N))   (2)can be shown to be distributed as a central F-distribution with p andN−p−1 degrees of freedom by $\begin{matrix}{F = {\frac{\left( {N - p - 1} \right){ND}^{2}}{{p\left( {N - 1} \right)}^{2} - {NpD}^{2}}.}} & (3)\end{matrix}$

Then, the null hypothesis of a common population mean vector x₀ and theremaining x_(i) will be rejected ifF>F_(a;p,N−p−1),   (4)where F_(a;p,N−p−1) is the upper α·100% point of the F-distribution with(p,N−p−1) degrees of freedom.Now suppose that xo was chosen as the observation vector with themaximum D² statistic. The distribution of the maximum D² from a randomsample of size N is complicated. However a conservative approximation tothe 100α percent upper critical value can be obtained by the Bonferroniinequality. Therefore we might conclude that x₀ is an outlier if$\begin{matrix}{F > {F_{{\frac{\alpha}{N};p},{N - p - 1}}.}} & (5)\end{matrix}$

In practice, either equations (4) or (5) can be used for outlierdetection.We can make use of the following incremental estimates of the mean andcovariance in devising a test for new examples which do not form part ofthe original sample when an additional datum x_(N+1) is made available,i.e. the mean $\begin{matrix}{{\hat{\mu}}_{N + 1} = {\frac{1}{N + 1}\left\{ {{N\quad{\hat{\mu}}_{N}} + x_{N + 1}} \right\}}} & (6)\end{matrix}$and the covariance $\begin{matrix}{{\hat{C}}_{N + 1} = {{\frac{N}{N + 1}{\hat{C}}_{N}} + {\frac{N}{\left( {N + 1} \right)^{2}}\left( {x_{N + 1} - {\hat{\mu}}_{N}} \right){\left( {x_{N + 1} - {\hat{\mu}}_{N}} \right)^{T}.}}}} & (7)\end{matrix}$

By using the expression of (6), (7) and the matrix inversion lemma,Equation (2) for an N-sample reference set and an N+1′th test pointbecomesD ²=σ_(N+1) ^(T) Ĉ _(N+1) ⁻¹σ_(N+1),   (8)where $\begin{matrix}{{\sigma_{N + 1} = {\left( {x_{N + 1} - {\hat{\mu}}_{N + 1}} \right) = {\frac{N}{N + 1}\left( {x_{N + 1} - {\hat{\mu}}_{N}} \right)}}},{and}} & (9) \\{{\hat{C}}_{N + 1}^{- 1} = {\frac{N + 1}{N}{\left( {{\hat{C}}_{N}^{- 1} - \frac{{{\hat{C}}_{N}^{- 1}\left( {x_{N + 1} - {\hat{\mu}}_{N}} \right)}\left( {x_{N + 1} - {\hat{\mu}}_{N}} \right)^{T}{\hat{C}}_{N}^{- 1}}{N + 1 + {\left( {x_{N + 1} - {\hat{\mu}}_{N}} \right)^{T}{{\hat{C}}_{N}^{- 1}\left( {x_{N + 1} - {\hat{\mu}}_{N}} \right)}}}} \right).}}} & (10)\end{matrix}$

Denoting (x_(N+1)−{circumflex over (μ)}_(N))^(T) Ĉ _(N)⁻¹(x_(N+1)−{circumflex over (μ)}_(N)) by D_(N+1,N), then $\begin{matrix}{D^{2} = {\frac{{ND}_{{N + 1},N}^{2}}{N + 1 + D_{{N + 1},N}^{2}}.}} & (11)\end{matrix}$

So a new point x_(N+1) can be tested against an estimated and assumednormal distribution for a common estimated mean {circumflex over(μ)}_(N) and covariance Ĉ_(N). Though the assumption of multivariateGaussian feature vectors often does not hold in practice, it has beenfound as an appropriate pragmatic choice for many applications. We relaxthis assumption and consider arbitrary densities in the followingsection.

2) Feature Vectors with arbitrary Density: A probability densityestimate {circumflex over (p)}(x;θ) can be obtained from the finite datasample S={x₁, . . . ,x_(N)}∈

^(d) drawn from an arbitrary density p(x), by using any suitablesemi-parametric (e.g. Gaussian Mixture Model) or non-parametric (e.g.Parzen window method) density estimation methods as known in the art.This density can then be employed in computing the log-likelihood ratio(1). Unlike the case of the multivariate Gaussian distribution there isno analytic distribution for the test statistic (λ) under the nullhypothesis. So to obtain this distribution, numerical bootstrap methodscan be employed to obtain the otherwise non-analytic null distributionunder the estimated density and so the various critical values ofλ_(crit) can be established from the empirical distribution obtained. Itcan be shown that in the limit as N→∞, the likelihood ratio can beestimated by the following $\begin{matrix}{\lambda = \left. \frac{\sup\limits_{\theta \in \Theta}{L_{0}(\theta)}}{\sup\limits_{\theta \in \Theta}{L_{1}(\theta)}}\rightarrow{\hat{p}\left( {x_{N + 1};{\hat{\theta}}_{N}} \right)} \right.} & (12)\end{matrix}$where {circumflex over (p)}(x_(N+1);{circumflex over (θ)}_(N)) denotesthe probability density of x_(N+1) under the model estimated by theoriginal N samples.

After generating B sets bootstrap of N samples from the reference dataset and using each of these to estimate the parameters of the densitydistribution {circumflex over (θ)}_(N) ^(i), B bootstrap replicates ofthe test statistic λ_(crit) ^(i),i=1, . . . ,B can be obtained byrandomly selecting an N+1′th sample and computing {circumflex over(p)}(x_(N+1);{circumflex over (θ)}_(N) ^(i))≈λ_(crit) ^(i). By orderingλ_(crit) ^(i) in ascending order, the critical value a can be defined toreject the null-hypothesis at the desired significance level if λ≦λ_(a),where λ_(a) is the jth smallest value of λ_(crit) ^(i), and α=j/(B+1).

Preferably the method of forming the classifier is repeated fordifferent numbers of segments and tested using images of banknotes knownto be either counterfeit or not. The number of segments giving the bestperformance is then selected and the classifier using that number ofsegments used. We found that the best number of segments to be fromabout 2 to 15 although any suitable number of segments can be used.

As mentioned above, a particular problem involves identifying andreplacing aberrant image elements in an image of a banknote to bevalidated. FIG. 3 is a flow diagram of the process of replacing theaberrant image elements with decision-neutral data. For each imageelement (box 300) for example, pixel, group of pixels, a distribution isaccessed (box 301) for that image position. The distribution is anestimated distribution for that image position across all images in atraining set of images. The training set of images may be a plurality ofimages of genuine banknotes as described above. For example, thedistribution may be a pixel intensity profile or an intensity profilefor a block of four pixel positions, or similar as described above.Preferably, the distribution is the same as that used during a processof forming a segmentation map for the banknote validator as describedabove. This reduces computation costs and saves time as thosedistributions are already estimated.

A value is then selected (box 302) from the accessed distribution on thebasis of a significance level (also referred to as a confidence level).That significance level is related to that of a classifier used in thebanknote validator. For example, the significance level is the same asthat used by the classifier. By selecting the value in this waydecision-neutral data is obtained because the significance level isrelated to that of the classifier. The value at the aberrant imageelement is then replaced by the selected value (see box 303). By usingdecision-neutral data in this way we ensure that the remainder of thenote dictates the classification results of the banknote validator. Thisis an advantage over conventional approaches where missing or corruptdata on a genuine note means that to avoid many false rejects, the falseaccept rate would suffer. In this way we are able to successfully dealwith damaged, worn, torn or partially faded notes without the need tomodify the core banknote validation process. Pre-processing of thebanknote images is all that is required. In addition, this is achievedwithout compromising the false accept rate.

FIG. 4 is a schematic diagram of an apparatus 20 for creating aclassifier 22 for banknote validation. It comprises:

-   -   an input 21 arranged to access a training set of banknote        images;    -   a processor 23 arranged to create a segmentation map using the        training set images;    -   a segmentor 24 arranged to segmenting each of the training set        images using the segmentation map;    -   a feature extractor 25 arranged to extract one or more features        from each segment in each of the training set images; and    -   classification forming means 26 arranged to form the classifier        using the feature information;        wherein the processor is arranged to create the segmentation map        on the basis of information from all images in the training set.        For example, by using spatio-temporal image decomposition        described above.

FIG. 5 is a schematic diagram of a banknote validator 31. It comprises:

-   -   an input arranged to receive at least one image 30 of a banknote        to be validated;    -   a segmentation map 32;    -   a processor 36 arranged to identify aberrations in the image;    -   an image modifier 37 arranged to form a modified image by        replacing the identified aberrations by neutral decision making        data, that data being neutral decision making data with respect        to the classifier 35    -   another processor 33 (which may be integral with processor 36)        arranged to segment the image of the banknote using the        segmentation map;    -   a feature extractor 34 arranged to extract one or more features        from each segment of the banknote image;    -   a classifier 35 arranged to classify the banknote as being        either valid or not on the basis of the extracted features;        wherein the segmentation map comprises information about        relationships of corresponding image elements between all images        in a training set of images of banknotes. It is noted that it is        not essential for the components of FIG. 5 to be independent of        one another, these may be integral.

FIG. 6 is a flow diagram of a method of validating a banknote. Themethod comprises:

-   -   accessing at least one image of a banknote to be validated (box        40);    -   identify aberrant image elements (box 41);    -   replace aberrant image elements by decision neutral data (box        42);    -   accessing a segmentation map (box 43);    -   segmenting the image of the banknote using the segmentation map        (box 44);    -   extracting features from each segment of the banknote image (box        45);    -   classifying the banknote as being either valid or not on the        basis of the extracted features using a classifier (box 46);        wherein the segmentation map is formed on the basis of        information about each of a set of training images of banknotes.        These method steps can be carried out in any suitable order or        in combination as is known in the art. The segmentation map can        be said to implicitly comprise information about each of the        images in the training set because it has been formed on the        basis of that information. However, the explicit information in        the segmentation map can be a simple file with a list of pixel        addresses to be included in each segment.

FIG. 7 is a schematic diagram of a self-service apparatus 51 with abanknote validator 53. It comprises:

-   -   a means for accepting banknotes 50,    -   imaging means for obtaining digital images of the banknotes 52;    -   a processor for replacing aberrant image elements with        decision-neutral data 54; and    -   a banknote validator 53 as described above.

The methods described herein are performed on images or otherrepresentations of banknotes, those images/representations being of anysuitable type. For example, images on any of a red, blue and greenchannel or other images as mentioned above.

The segmentations may be formed on the basis of the images of only onetype, say the red channel. Alternatively, the segmentation map may beformed on the basis of the images of all types, say the red, blue andgreen channel. It is also possible to form a plurality of segmentationmaps, one for each type of image or combination of image types. Forexample, there may be three segmentation maps one for the red channelimages, one for the blue channel images and one for the green channelimages. In that case, during validation of an individual note, theappropriate segmentation map/classifier is used depending on the type ofimage selected. Thus each of the methods described above may be modifiedby using images of different types and corresponding segmentationmaps/classifiers.

The means for accepting banknotes is of any suitable type as known inthe art as is the imaging means. Any feature selection algorithm knownin the art may be used to select one or more types of feature to use inthe step of extracting features. Also, the classifier can be formed onthe basis of specified information about a particular denomination orcurrency of banknotes in addition to the feature information discussedherein. For example, information about particularly data rich regions interms of color or other information, spatial frequency or shapes in agiven currency and denomination.

Any range or device value given herein may be extended or alteredwithout losing the effect sought, as will be apparent to the skilledperson.

It will be understood that the above description of a preferredembodiment is given by way of example only and that variousmodifications may be made by those skilled in the art.

1. A method of processing an image of a media item comprising: (i)identifying aberrations in the image; (ii) forming a modified image byreplacing the identified aberrations by neutral decision making data,that data being neutral decision making data with respect to a decisionmaking process being a pre-specified media item validation process.
 2. Amethod as claimed in claim 1 wherein the step of identifying aberrationsin the image comprises applying a bandpass filter.
 3. A method asclaimed in claim 1 wherein the method comprises obtaining the neutraldecision making data by, for each aberrant image element, accessing anestimated distribution for that image position across all images in atraining set of images of media items and selecting a value from thatestimated distribution.
 4. A method as claimed in claim 3 wherein thevalue is selected from the estimated distribution on the basis of asignificance level, being a significance level of the pre-specifiedmedia item validation process.
 5. A method as claimed in claim 3 whereinthe training set of images of media items comprises only images ofgenuine media items.
 6. A method as claimed in claim 3 wherein thedistribution is estimated on the basis of a pixel intensity profile. 7.A method as claimed in 1 wherein said pre-specified media itemvalidation process comprises using a one-class classifier.
 8. A methodas claimed in claim 1 which further comprises providing the modifiedimage as input to the pre-specified media item validation process.
 9. Anapparatus for processing an image of a media item the apparatuscomprising: (i) a processor arranged to identify aberrations in theimage; (ii) an image modifier arranged to form a modified image byreplacing the identified aberrations by neutral decision making data,that data being neutral decision making data with respect to a decisionmaking process being a pre-specified media item validation process. 10.An apparatus as claimed in claim 9 wherein the processor comprises abandpass filter for identifying aberrations in the image.
 11. Anapparatus as claimed in claim 9 wherein the image modifier is arrangedto obtain the neutral decision making data by, for each aberrant imageelement, accessing an estimated distribution for that image positionacross all images in a training set of images of media items andselecting a value from that estimated distribution.
 12. An apparatus asclaimed in claim 11 wherein the image modifier is arranged to select thevalue from the estimated distribution on the basis of a significancelevel, being a significance level of the pre-specified media itemvalidation process.
 13. An apparatus as claimed in claim 11 wherein theimage modifier is arranged to estimate the distribution on the basis ofa pixel intensity profile.
 14. An apparatus as claimed in claim 11wherein the image modifier is arranged to estimate the distribution froma training set of images comprising only images of genuine media items.15. An apparatus as claimed in 9 comprising a banknote validator andwherein the image modifier is arranged to input the modified image tothe media item validator.
 16. An apparatus as claimed in claim 15wherein the media item validator comprises a one-class classifier.
 17. Amedia item validator comprising: (i) an input arranged to receive atleast one image of a media item to be validated; (ii) a processorarranged to identify aberrations in the image; (iii) an image modifierarranged to form a modified image by replacing the identifiedaberrations by neutral decision making data, that data being neutraldecision making data with respect to a classifier of the media itemvalidator; (iv) a segmentation map; (v) a processor arranged to segmentthe image of the media item using the segmentation map; (vi) a featureextractor arranged to extract one or more features from each segment ofthe image of the media item; (vii) a classifier arranged to classify themedia item on the basis of the extracted features; wherein thesegmentation map comprises information about relationships ofcorresponding image elements between all images in a set of trainingimages of media items.
 18. A media item validator as claimed in claim 17wherein the image modifier is arranged to obtain the neutral decisionmaking data by, for each aberrant image element, accessing an estimateddistribution for that image position across all images in a training setof images of media items and selecting a value from that estimateddistribution.
 19. A computer program comprising computer program codemeans adapted to perform all the steps of a method of processing animage of a banknote comprising: (i) identifying aberrations in theimage; (ii) forming a modified image by replacing the identifiedaberrations by neutral decision making data, that data being neutraldecision making data with respect to a decision making process being apre-specified banknote validation process, when said program is run on acomputer.
 20. A computer program as claimed in claim 19 embodied on acomputer readable medium.
 21. A self-service apparatus comprising: (i) ameans for accepting media items, (ii) imaging means for obtainingdigital images of the media items; and (iii) a media item validatorcomprising: (i) an input arranged to receive at least one image of amedia item to be validated; (ii) a processor arranged to identifyaberrations in the image; (iii) an image modifier arranged to form amodified image by replacing the identified aberrations by neutraldecision making data, that data being neutral decision making data withrespect to a classifier of the media item validator; (iv) a segmentationmap; (v) a processor arranged to segment the image of the media itemusing the segmentation map; (vi) a feature extractor arranged to extractone or more features from each segment of the image of the media item;(vii) a classifier arranged to classify the media item on the basis ofthe extracted features; wherein the segmentation map comprisesinformation about relationships of corresponding image elements betweenall images in a set of training images of media items.